package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import cn.wolfcode.trip.base.query.UserProfilesQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();
    int updateByPrimaryKey(Travel record);

    List<Travel> selectForList(TravelQueryObject qo);

    void changeStateById(@Param("id") Long id, @Param("state") Integer state);

    Map<String,Object>  getCounts(String keyword);

    List<Travel> selectTravelsByUserId(UserProfilesQueryObject qo);
}